Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This hotfix fixes first-time
/telegram-setuppairing startup after the 0.18.1 transport hotfix.It updates the live in-memory Telegram config immediately after the validated token is persisted and before polling starts, so the extension no longer prints pairing guidance while the poller still sees an unconfigured bot.
Why
In 0.18.1, setup could validate the token and show
Send /start..., butstartPolling()still read the old in-memory config becausesetConfig()happened only afterrunTelegramSetup()returned. On a fresh install this could produceTelegram bot is not configured, leave the status attelegram awaiting pairing, and make/startappear ignored even though the operator followed the prompt.User-visible behavior
/telegram-setupupdates live config before starting polling./startcan be received after successful setup without restarting Pi.Changed areas
lib/setup.ts: persists and updates live config before notifying and starting polling.tests/setup.test.ts,tests/config.test.ts: cover the config-before-polling ordering.@llblab/pi-telegramto0.18.2.Risk Notes
No config migration required. The change only moves live config update earlier in the existing successful setup path, after token validation and persistence succeed.
Validation
npm run validate— passed (typecheck, tests, audit, pack dry-run)repo_context_check /home/llb/.pi/agent/extensions/pi-telegram— passed, 0 errors / 0 warnings